/**
 * 
 */
package com.thor.palmmall.rest.order.converter;

import java.util.ArrayList;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.order.AProductPromParam;
import com.thor.palmmall.rest.order.AProductPromParamFilter;
import com.thor.palmmall.rest.statement.ABuildingsParam;
import com.thor.palmmall.spi.basic.SBuildingsParam;
import com.thor.palmmall.spi.order.SProductPromParam;
import com.thor.palmmall.spi.order.SProductPromParamFilter;

/**
 * @author NuoSa
 *
 * @since 1.0
 */
public class SProductPromParamFilterConverter implements Converter<AProductPromParamFilter, SProductPromParamFilter> {
  public static SProductPromParamFilterConverter getInstance() {
    if (instance == null)
      instance = new SProductPromParamFilterConverter();
    return instance;
  }

  private static SProductPromParamFilterConverter instance;

  private SProductPromParamFilterConverter() {
  }

  @Override
  public SProductPromParamFilter convert(AProductPromParamFilter source) {
    if (source == null) {
      return null;
    }
    SProductPromParamFilter target = new SProductPromParamFilter();
    
    target.setFilter(SProductPromParamConverter
        .getInstance().convert(source.getFilter()));
    

    return target;
  }

}
